home *** CD-ROM | disk | FTP | other *** search
/ Run Magazine ReRun 1986 March & April / rerun-1986-03-04.d64 / autoboot 64 (.txt) next >
Commodore BASIC  |  2022-09-20  |  3KB  |  80 lines

  1. 0 rem**********************************
  2. 1 rem*                                *
  3. 2 rem*           autoboot 64          *
  4. 3 rem*           (c) 1984             *
  5. 4 rem*           doug smoak           *
  6. 5 rem*           303 heyward st.      *
  7. 6 rem*           columbia sc 29201    *
  8. 7 rem*           803-765-1189         *
  9. 8 rem*                                *
  10. 9 rem**********************************
  11. 10 dima(335):i=1:bo=53280:bg=bo+1:poke646,15:print"[147]autoboot 64"
  12. 20 pokebg,11:pokebo,12
  13. 30 print"instructions? y/n[146]":gosub440:ifg$="y"thengosub270
  14. 40 print"[147]setting up..."
  15. 50 reada:ifa>=0thena(i)=a:i=i+1:goto50
  16. 60 input"[147]name of file to be loaded";n$:ifn$=""then60
  17. 70 iflen(n$)>16thenprint"name too long!":goto60
  18. 80 input"is this a basic program y/n[146]";bs$:ifbs$=""then80
  19. 90 ifbs$<>"n"then140
  20. 100 fori=292to315:a(i)=234:next
  21. 110 print"sys address for ml start (decimal)"
  22. 120 input"";sy$:sy=val(sy$):ifsy<2048then110
  23. 130 a(319)=int(sy/256):a(318)=sy-256*a(319):a(317)=76
  24. 140 a(275)=len(n$):forj=1tolen(n$)
  25. 150 a(319+j)=asc(mid$(n$,j,1)):next
  26. 160 input"name of autorun boot";f$:iff$=""orf$=n$then160
  27. 170 iflen(f$)>16thenprint"name too long!":goto160
  28. 180 open15,8,15
  29. 190 open8,8,8,f$+",p,w":gosub670
  30. 200 print#8,chr$(0);chr$(1);
  31. 210 fori=1to335:print#8,chr$(a(i));
  32. 220 ifi/30=int(i/30)thenpokebo,(peek(bo)+1)and15
  33. 230 next:pokebo,12
  34. 240 gosub670:close8:close15
  35. 250 print"autorun boot name..."f$
  36. 260 end
  37. 270 print"[147]this program will create a 'boot'"
  38. 280 print"that will autorun[155] when loaded and then"
  39. 290 print"load and run[155] the program that you want"
  40. 300 print"to have autorun. note that this is for"
  41. 310 print"disk only and that the 'boot' must[155] be"
  42. 320 print"loaded with a ,1 after it, such as..."
  43. 330 print"load 'prg',8,1."
  44. 340 print"this will make autorun boots for basic[155]"
  45. 350 print"or machine language[155] programs."
  46. 360 print"     <press any key  to continue>[146]":gosub440
  47. 370 print"[147]note also that the boot acts like a "
  48. 380 print"non-relocating load (load 'prg',8,1) "
  49. 390 print"so be sure that the program to be "
  50. 400 print"loaded has been saved from the proper"
  51. 410 print"location or the header has been "
  52. 420 print"re-written."
  53. 430 print"     <press any key  to continue>[146]"
  54. 440 getg$:on-(g$="")goto440:return
  55. 450 data 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  56. 460 data 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  57. 470 data 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  58. 480 data 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  59. 490 data 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  60. 500 data 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  61. 510 data 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  62. 520 data 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  63. 530 data 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  64. 540 data 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  65. 550 data 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  66. 560 data 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  67. 570 data 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  68. 580 data 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  69. 590 data 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  70. 600 data 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  71. 610 data 2,2,2,2,2,2,2,2,2,2,2,2,2,2,2
  72. 620 data 2,0,0,0,120,169,0,133,157,169,8,162,8,160,1
  73. 630 data 32,186,255,169,8,162,63,160,2,32,189,255,169,0,32
  74. 640 data 213,255,134,45,132,46,169,82,141,119,2,169,85,141,120,2,169,78,141
  75. 650 data 121,2,169,13,141,122,2,169,4,133,198,88,108,2,3
  76. 660 data32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,32,-1
  77. 670 input#15,a,b$,c,d:ifathen690
  78. 680 return
  79. 690 print""a;""b$" error[146]":close8:close15:end
  80.